#include "FactoryOutput.h"
#include <QDebug>

#include "ModRunDescOutput.h"
#include "ModRunOutput.h"

FactoryOutput::FactoryOutput()
{
    qDebug() << "FactoryOutput 单例构造";
    m_pUIElement = nullptr;
}

FactoryOutput::~FactoryOutput()
{
    qDebug() << "FactoryOutput 单例析构";
}

//初始化ModRun信息;
void FactoryOutput::InitData(IUIElement* pElement)
{
    m_pUIElement = pElement;
}

//创建IOutput:显示简介和描述;
std::shared_ptr<IOutput> FactoryOutput::CreateDescOutput()
{
    std::shared_ptr<IOutput> pOutPut(new CModRunDescOutput(m_pUIElement));
    return pOutPut;
}

//创建IOutput:显示运行结果;
std::shared_ptr<IOutput> FactoryOutput::CreateRunOutput()
{
    std::shared_ptr<IOutput> pOutPut(new CModRunOutput(m_pUIElement));
    return pOutPut;
}
